Skip to content

Conversation

@sanderegg
Copy link
Member

@sanderegg sanderegg commented May 21, 2025

What do these changes do?

This pull request introduces significant updates to the performance testing framework for osparc-simcore, focusing on modernization, simplification, and improved usability. Key changes include replacing Docker-based workflows with Python-based tools, adding robust credential and configuration management, and enhancing the Makefile and documentation for better developer and CI integration.

image

image

Major Changes

0. Upgrade of locust version, simplification of usage, migration of locust files (simple RPS tester, webserver services tester, meta-modelling tests)

1. Makefile and Workflow Enhancements

  • Overhauled tests/performance/Makefile to replace Docker-based workflows with Python-based tools, introducing new targets for deployment testing, credential management, and configuration file handling. Added interactive prompts for first-time setup and CI-specific modes.

2. Credential and Configuration Management

  • Introduced .auth-credentials.env and .locust.conf files for storing credentials and Locust configurations, with support for interactive prompts or CI pipelines. Updated .gitignore to exclude these files.
  • Added DeploymentAuth and OsparcAuth classes in auth_settings.py for securely managing credentials using Pydantic.

3. Codebase Simplification

  • Removed Docker-related files, including Dockerfile, docker-compose.yml, and associated Makefile targets, to simplify the setup and reduce dependencies.

4. Test Framework Enhancements

  • Added OsparcUserBase and OsparcWebUserBase classes in base_user.py to provide reusable base classes for Locust users, supporting authenticated requests and optional login/logout functionality.

5. Improved Documentation

  • Updated README.md with detailed instructions on using the new Makefile targets, setting up credentials and configurations, and running tests interactively or in CI. Added examples for CI integration and Grafana visualization.

Related issue/s

How to test

Dev-ops

@sanderegg sanderegg added this to the Bazinga! milestone May 21, 2025
@sanderegg sanderegg self-assigned this May 21, 2025
@sanderegg sanderegg added t:maintenance Some planned maintenance work e2e Bugs found by or related to the end-2-end testing labels May 21, 2025
@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.41%. Comparing base (c13a946) to head (7481e0f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7711       +/-   ##
===========================================
- Coverage   86.79%   64.41%   -22.38%     
===========================================
  Files        1841      683     -1158     
  Lines       71507    32262    -39245     
  Branches     1215      174     -1041     
===========================================
- Hits        62066    20783    -41283     
- Misses       9099    11421     +2322     
+ Partials      342       58      -284     
Flag Coverage Δ
integrationtests 64.41% <ø> (+0.02%) ⬆️
unittests ?
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 76.95% <ø> (-8.18%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 77.63% <ø> (-13.38%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 61.68% <ø> (-28.46%) ⬇️
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 59.21% <ø> (-24.74%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c13a946...7481e0f. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sanderegg sanderegg force-pushed the new-locust-checks branch 6 times, most recently from 8a89c23 to 32e33a7 Compare May 27, 2025 09:58
@sanderegg sanderegg force-pushed the new-locust-checks branch from 32e33a7 to 39de6e4 Compare May 27, 2025 12:53
@sanderegg sanderegg marked this pull request as ready for review May 27, 2025 13:10
@sanderegg sanderegg requested a review from pcrespov as a code owner May 27, 2025 13:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the performance testing framework by replacing Docker-based workflows with Python-based tools, enhancing credential/configuration management, and improving usability and documentation.

  • Introduces new locust test files (e.g., single endpoint RPS tester) with updated authentication handling.
  • Removes obsolete Docker-related files and configurations.
  • Updates the Makefile and README to support interactive and CI-based testing, alongside Grafana integration.

Reviewed Changes

Copilot reviewed 30 out of 36 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/performance/locustfiles/deployment_max_rps_single_endpoint.py New locust test file utilizing interactive endpoint selection and authentication.
tests/performance/locust_settings.py Removed obsolete settings file no longer needed with the updated workflow.
tests/performance/locust_files/webserver_services.py Removed deprecated Docker-based webservice test file.
tests/performance/locust_files/user_basic_calls.py Removed outdated test file for basic API calls.
tests/performance/locust_files/platform_ping_test.py Removed redundant test file for platform ping functionality.
tests/performance/locust_files/locustfile.py Removed generic locustfile now replaced by specialized test files.
tests/performance/locust_files/director_services.py Removed legacy director services test file.
tests/performance/locust_files/catalog_services.py Removed legacy catalog services test file.
tests/performance/common/base_user.py Added new base user classes with enhanced authentication and logging support.
tests/performance/common/auth_settings.py Introduced new authentication settings leveraging Pydantic’s configuration management.
tests/performance/README.md Expanded documentation and updated Makefile target descriptions for clarity.
Files not reviewed (6)
  • scripts/common.Makefile: Language not supported
  • tests/performance/.gitignore: Language not supported
  • tests/performance/Dockerfile: Language not supported
  • tests/performance/Makefile: Language not supported
  • tests/performance/docker-compose.yml: Language not supported
  • tests/performance/docker/Dockerfile: Language not supported

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx! Greatly appreciated! Will start using it more.

@sonarqubecloud
Copy link

@sanderegg sanderegg merged commit aa81408 into ITISFoundation:master May 27, 2025
91 of 95 checks passed
@sanderegg sanderegg deleted the new-locust-checks branch May 27, 2025 15:18
@bisgaard-itis
Copy link
Contributor

Very nice! Thanks a lot for the effort! Will start using immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Bugs found by or related to the end-2-end testing t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants